#FROM registry.cn-shanghai.aliyuncs.com/seari-electric/openjdk8:1.2.0
#ENV TZ=Asia/Shanghai
#COPY ./ /usr/local
#WORKDIR /usr/local
#EXPOSE 9099
#ENTRYPOINT ["sh","-c","java $JAVA_OPTS -cp ${project.name}-${project.version}.jar:lib/* com.seari.ldar.Application"]

# 默认使用阿里云镜像
FROM openjdk:11-jre-slim
ENV TZ=Asia/Shanghai
# 设置工作目录
WORKDIR /app
COPY ./ /app
# 将本地的 jar 文件拷贝到容器中
COPY ./erupt-frp-*.jar /app/Application.jar
# 暴露应用运行的端口
EXPOSE 9099
# 设置 JVM 堆内存和线程栈大小
ENV JAVA_OPTS="-Xms256m -Xmx512m -Xss256k"
# 定义容器启动时执行的命令
ENTRYPOINT ["sh", "-c"]
#CMD ["java -jar /app/Application.jar ${JAVA_OPTS}"]
CMD ["java ${JAVA_OPTS} -cp Application.jar:lib/* com.erupt.frp.Application"]
